<template>
	<BasicModal v-bind="$attrs" z-index="1000" style="z-index:999" @register="registerModal" title="输入退款金额点击确定退款"
		@ok="confirmCombinedJounery" :helpMessage="['提示', '输入退款金额']">
		<BasicForm @register="registerForm">

		</BasicForm>
	</BasicModal>
</template>
<script lang="ts" setup>
	import { defineComponent, ref, unref, inject } from 'vue';
	import { refundPriceSchema } from '../../CoupleActivityCarpoolBus.data';
	import { refundAAprtOfByUserId } from '../../CoupleActivityCarpoolBus.api';
	import { useMessage } from '/@/hooks/web/useMessage';
	import { BasicForm, useForm } from '/@/components/Form/index';
	import { BasicModal, useModalInner } from '/@/components/Modal';
	const emit = defineEmits(['register', 'successConfirm']);
	let userId = "",rorderId=''
	const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
		userId = data.userId
rorderId=data.rorderId
		setModalProps({ zIndex: 1000 })
	})
	const [registerForm, { setProps, resetFields, setFieldsValue, validate }] = useForm({

		//labelWidth: 150,
		schemas: refundPriceSchema,
		showActionButtonGroup: false,
		baseColProps: { span: 24 },


	});


	async function confirmCombinedJounery() {
		let values = await validate();
		values.userId = userId;
		values.thisItineraryId = rorderId;

		//提交表单
		await refundAAprtOfByUserId(values);
		closeModal();

	}
</script>

<style>
	.ant-input-number {
		width: 100%;
	}
</style>